<script setup>
import { inject } from 'vue';

const money = inject('money')
const add = inject('add')
</script>

<template>
    <h1>我是孙组件</h1>
    <div>{{ money }}</div>
    <button @click="add">点我加工资</button>
</template>
